import app
from config import DevelopConfig, config_dict

flask_app = app.create(DevelopConfig)
# flask_app=app.create(config_dict.get('develop'))

# 扩展命令
from flask_script import Manager

manager = Manager(flask_app)

# 添加迁移命令
from models import db
from flask_migrate import MigrateCommand, Migrate

Migrate(flask_app, db)
manager.add_command('db', MigrateCommand)

if __name__ == '__main__':
    print(flask_app.url_map)
    manager.run()
